package com.android.ddfafu;

import android.app.Application;
import android.graphics.Bitmap;
import android.os.Bundle;

import com.android.ddfafu.baiduLocation.LocationUtil;
import com.android.ddfafu.domian.ImageData;
import com.android.ddfafu.domian.StaticBundleData;
import com.android.ddfafu.result.UserData;
import com.baidu.location.BDLocation;
import com.baidu.mapapi.model.LatLng;

import java.util.List;

/**
 * @description 百度地图初始化坐标
 */
public class MapApplication extends Application {

    private StaticBundleData staticBundleData;
    private LocationUtil locationUtil;
    private UserData userData;
    private ImageData imageData;
    private List<Bitmap> bitmapList;

    private Bitmap mBitmap;

    @Override
    public void onCreate() {
        super.onCreate();
        locationUtil = new LocationUtil(this);
        userData = new UserData();
        imageData = new ImageData(this);
        staticBundleData = new StaticBundleData(this);
    }

    public void setmBitmap(Bitmap mBitmap) {
        this.mBitmap = mBitmap;
    }

    public Bitmap getmBitmap() {
        return mBitmap;
    }

    public String getApplicationUsername(){
        return userData.getUsername();
    }

    public List<Bitmap> getBitmapList() {
        return imageData.getBitmapList();
    }



    public List<String> getBitmapPath(){
        return imageData.getBitmapPathList();
    }

    public String getApplicationToken(){
        return userData.getToken();
    }



    public void putUserInfo(UserData userData){
        this.userData = userData;
    }

    public LatLng getLatLng() {
        return locationUtil.getLatLng();
    }

    public BDLocation getBdLocation() {
        return locationUtil.getBdLocation();
    }

    public List<Bundle> getBundleList(){
        return staticBundleData.getBundleList();
    }

    public void addBundle(Bundle bundle){
        staticBundleData.addBundle(bundle);
    }




}
